package com.flymobi.wap;

import com.flymobi.fw.modules.SM;
import com.flymobi.fw.util.StringUtil;
import com.flymobi.po.Qudao;
import com.flymobi.util.WebContext;

public class IndexAction extends WapAction {
	private static final long serialVersionUID = 1L;
	public String webProcess(WebContext context) {
		return "index";
	}
	
	@Override
	public Long getQudao(WebContext context) {
		String reqUri = context.getRequest().getRequestURI();
		reqUri=reqUri.replaceAll("//", "&&");
		String code = StringUtil.findStr(reqUri, "/", ".");
		if (StringUtil.isEmpty(code)||"index".equals(code)) {
			return 0L;
		}
		Qudao qudao = SM.QudaoService.getFromCache(code);
		if(qudao!=null){
			return qudao.getId();
		}
		return 0L;
	}
}
